<form ng-controller="ListValueCtrl" style="height:100%;">
	<div class="form-group">
		<div class="input-group">
			<input type="text" class="form-control" ng-model="keyName">
			<div class="input-group-append">
				<button class="btn btn-outline-primary" type="button" ng-click="updateName()">修改名称</button>
			</div>
			<input type="text" ng-model="ttl" class="form-control">
			<div class="input-group-append">
				<button class="btn btn-outline-primary" type="button" ng-click="updateTTL()">更新过期时间</button>
			</div>
		</div>
	</div>
	<div class="form-group">
		<div class="input-group">
			<input type="text" class="form-control" ng-model="selectedItem.data" ng-disabled="updateDisabled">
			<div class="input-group-append">
				<button class="btn btn-outline-primary" type="button" ng-disabled="updateDisabled" ng-click="updateItem()">修改值</button>
			</div>
		</div>
	</div>
	<div class="form-group">
		<div class="input-group">
			<input type="text" class="form-control" ng-model="newItemData">
			<div class="input-group-append">
				<button class="btn btn-outline-primary" type="button" ng-click="newItemL()">从左新增值</button>
			</div>
			<div class="input-group-append">
				<button class="btn btn-outline-primary" type="button" ng-click="newItemR()">从右新增值</button>
			</div>
		</div>
	</div>
	<ul uib-pagination total-items="totalCount" ng-change="loadPage()" ng-model="currentPage" max-size="10" items-per-page="100"
	    next-text="下一页" previous-text="上一页" class="pagination" boundary-link-numbers="true"></ul>
	<div style="height: calc(100% - 205px);  overflow: auto;">
		<table class="table table-hover table-bordered table-sm">
			<thead>
				<tr>
					<th>下标</th>
					<th>元素</th>
					<th style="width: 75px;">操作</th>
				</tr>
			</thead>
			<tbody>
				<tr ng-repeat="item in items" ng-click="editItem(item)">
					<td>{{item.index}}</td>
					<td>{{item.data}}</td>
					<td>
						<button type="button" class="btn btn-danger btn-sm" ng-click="deleteItem(item)">删除</button>
					</td>
				</tr>
			</tbody>
		</table>
	</div>
</form>
